﻿<Window x:Class="VSCodeLineCounter.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Visual Studio Code Line Counter" Height="500"
		Width="920" MinWidth="300" MinHeight="300" FontFamily="Segoe UI" FontSize="12"
		TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType" UseLayoutRounding="True"
		SnapsToDevicePixels="True">
	<Grid Margin="10">
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<Grid.Resources>
			<Style TargetType="TextBlock">
				<Setter Property="TextTrimming" Value="CharacterEllipsis" />
			</Style>
			<Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="ScrollViewer">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ScrollViewer">
							<Grid Background="{TemplateBinding Background}">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="*" />
									<ColumnDefinition Width="Auto" />
								</Grid.ColumnDefinitions>
								<Grid.RowDefinitions>
									<RowDefinition Height="*" />
									<RowDefinition Height="Auto" />
								</Grid.RowDefinitions>
								<DockPanel Margin="{TemplateBinding Padding}">
									<ScrollViewer DockPanel.Dock="Top" HorizontalScrollBarVisibility="Hidden"
											VerticalScrollBarVisibility="Hidden" Focusable="False">
										<GridViewHeaderRowPresenter Margin="2,0,2,0" Columns="{Binding Path=TemplatedParent.View.Columns,
                RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding
                Path=TemplatedParent.View.ColumnHeaderContainerStyle,
                RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplate="{Binding
                Path=TemplatedParent.View.ColumnHeaderTemplate,
                RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderTemplateSelector="{Binding 
                Path=TemplatedParent.View.ColumnHeaderTemplateSelector,
                RelativeSource={RelativeSource TemplatedParent}}" AllowsColumnReorder="{Binding
                Path=TemplatedParent.View.AllowsColumnReorder,
                RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContextMenu="{Binding
                Path=TemplatedParent.View.ColumnHeaderContextMenu,
                RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderToolTip="{Binding
                Path=TemplatedParent.View.ColumnHeaderToolTip,
                RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="{TemplateBinding
                SnapsToDevicePixels}" />
									</ScrollViewer>
									<ScrollContentPresenter Name="PART_ScrollContentPresenter"
											KeyboardNavigation.DirectionalNavigation="Local" CanContentScroll="True"
											CanHorizontallyScroll="False" CanVerticallyScroll="False" Focusable="False" />
								</DockPanel>
								<ScrollBar Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1"
										Maximum="{TemplateBinding ScrollableWidth}"
										ViewportSize="{TemplateBinding ViewportWidth}"
										Value="{TemplateBinding HorizontalOffset}"
										Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
								<ScrollBar Name="PART_VerticalScrollBar" Grid.Column="1"
										Maximum="{TemplateBinding ScrollableHeight}"
										ViewportSize="{TemplateBinding ViewportHeight}"
										Value="{TemplateBinding VerticalOffset}"
										Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" />
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
				<Setter Property="Width" Value="18" />
				<Setter Property="Background">
					<Setter.Value>
						<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
							<LinearGradientBrush.GradientStops>
								<GradientStopCollection>
									<GradientStop Color="#FFDFEAF7" Offset="0.0" />
									<GradientStop Color="White" Offset="1.0" />
								</GradientStopCollection>
							</LinearGradientBrush.GradientStops>
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Thumb}">
							<Border Padding="{TemplateBinding Padding}" Background="Transparent">
								<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}" />
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="BorderBrush">
					<Setter.Value>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="Black" Offset="0" />
							<GradientStop Color="White" Offset="1" />
						</LinearGradientBrush>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="{x:Type GridViewColumnHeader}" TargetType="GridViewColumnHeader">
				<Setter Property="HorizontalContentAlignment" Value="Left" />
				<Setter Property="VerticalContentAlignment" Value="Center" />
				<Setter Property="Foreground" Value="#FF4C607A" />
				<Setter Property="Padding" Value="6,0" />
				<Setter Property="Margin" Value="0,0,0,12" />
				<EventSetter Event="Click" Handler="GridViewColumnHeader_Click" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="GridViewColumnHeader">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal" />
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="HeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFF3F8FD" />
												</ColorAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="HeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFEFF3F9" />
												</ColorAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).
                    (GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="OuterHeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFDEE9F7" />
												</ColorAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="OuterHeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFE3E8EE" />
												</ColorAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed">
											<Storyboard>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="HeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFC1CCDA" />
												</ColorAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="HeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFF6F7F8" />
												</ColorAnimationUsingKeyFrames>
												<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).
                    (GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="HeaderBorder">
													<EasingDoubleKeyFrame KeyTime="0" Value="0.13" />
												</DoubleAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).
                    (GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="OuterHeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFC0CBD9" />
												</ColorAnimationUsingKeyFrames>
												<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).
                    (GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="OuterHeaderBorder">
													<EasingColorKeyFrame KeyTime="0" Value="#FFC0CBD9" />
												</ColorAnimationUsingKeyFrames>
												<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="Padding"
														Storyboard.TargetName="OuterHeaderBorder">
													<EasingThicknessKeyFrame KeyTime="0" Value="1,0" />
												</ThicknessAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Disabled" />
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border x:Name="OuterHeaderBorder" Height="24" BorderThickness="1,0,1,1" Padding="1">
									<Border.BorderBrush>
										<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
											<LinearGradientBrush.GradientStops>
												<GradientStopCollection>
													<GradientStop Color="White" Offset="0.0" />
													<GradientStop Color="White" Offset="1.0" />
												</GradientStopCollection>
											</LinearGradientBrush.GradientStops>
										</LinearGradientBrush>
									</Border.BorderBrush>
									<Border x:Name="HeaderBorder">
										<Border.Background>
											<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
												<LinearGradientBrush.GradientStops>
													<GradientStopCollection>
														<GradientStop Color="White" Offset="0.0" />
														<GradientStop Color="White" Offset="1.0" />
													</GradientStopCollection>
												</LinearGradientBrush.GradientStops>
											</LinearGradientBrush>
										</Border.Background>
										<ContentPresenter x:Name="HeaderContent" Margin="{TemplateBinding Padding}"
												RecognizesAccessKey="True"
												VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
												HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
												SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
									</Border>
								</Border>
								<Thumb x:Name="PART_HeaderGripper" HorizontalAlignment="Right" Margin="0,0,-9,0"
										Style="{StaticResource GridViewColumnHeaderGripper}" />
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Style.Triggers>
					<Trigger Property="Role" Value="Floating">
						<!--<Setter Property="Opacity" Value="0.7" />-->
						<Setter Property="Opacity" Value="0.8" />
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="GridViewColumnHeader">
									<Canvas Name="PART_FloatingHeaderCanvas">
										<!--<Rectangle Fill="#60000000" Width="{TemplateBinding ActualWidth}"
											Height="{TemplateBinding ActualHeight}" />-->
										<Border x:Name="OuterHeaderBorder" Height="24" BorderThickness="0,0,1,1"
												Padding="0,1,1,1">
											<Border.BorderBrush>
												<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
													<LinearGradientBrush.GradientStops>
														<GradientStopCollection>
															<GradientStop Color="#FFC0CBD9" Offset="0.0" />
															<GradientStop Color="#FFC0CBD9" Offset="1.0" />
														</GradientStopCollection>
													</LinearGradientBrush.GradientStops>
												</LinearGradientBrush>
											</Border.BorderBrush>
											<Border x:Name="HeaderBorder">
												<Border.Background>
													<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
														<LinearGradientBrush.GradientStops>
															<GradientStopCollection>
																<GradientStop Color="#FFC1CCDA" Offset="0.0" />
																<GradientStop Color="#FFF6F7F8" Offset="0.13" />
															</GradientStopCollection>
														</LinearGradientBrush.GradientStops>
													</LinearGradientBrush>
												</Border.Background>
											</Border>
										</Border>
									</Canvas>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Trigger>
					<Trigger Property="Role" Value="Padding">
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="GridViewColumnHeader">
									<Border Name="HeaderBorder" BorderThickness="0,1,0,1">
										<Border.Background>
											<SolidColorBrush Color="{DynamicResource ControlLightColor}" />
										</Border.Background>
										<Border.BorderBrush>
											<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
												<LinearGradientBrush.GradientStops>
													<GradientStopCollection>
														<GradientStop Color="{DynamicResource BorderLightColor}"
																Offset="0.0" />
														<GradientStop Color="{DynamicResource BorderDarkColor}"
																Offset="1.0" />
													</GradientStopCollection>
												</LinearGradientBrush.GradientStops>
											</LinearGradientBrush>
										</Border.BorderBrush>
									</Border>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Trigger>
				</Style.Triggers>
			</Style>
			<Style x:Key="{x:Type ListView}" TargetType="ListView">
				<Setter Property="SnapsToDevicePixels" Value="True" />
				<Setter Property="OverridesDefaultStyle" Value="True" />
				<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
				<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
				<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
				<Setter Property="VerticalContentAlignment" Value="Center" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ListView">
							<Border Name="Border" BorderThickness="0,1">
								<Border.Background>
									<SolidColorBrush Color="White" />
								</Border.Background>
								<Border.BorderBrush>
									<SolidColorBrush Color="#FFD6E5F5" />
								</Border.BorderBrush>
								<ScrollViewer x:Name="primaryScroller" Style="{StaticResource
                        {x:Static GridView.GridViewScrollViewerStyleKey}}">
									<ItemsPresenter />
								</ScrollViewer>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsGrouping" Value="True">
									<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
								</Trigger>
								<Trigger Property="IsEnabled" Value="False">
									<Setter TargetName="Border" Property="Background">
										<Setter.Value>
											<SolidColorBrush Color="{DynamicResource DisabledBorderLightColor}" />
										</Setter.Value>
									</Setter>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="{x:Type ListViewItem}" TargetType="ListViewItem">
				<Setter Property="SnapsToDevicePixels" Value="True" />
				<Setter Property="OverridesDefaultStyle" Value="True" />
				<!--<Setter Property="Height" Value="22" />-->
				<Setter Property="Padding" Value="0,2" />
				<Setter Property="VerticalContentAlignment" Value="Center" />
				<Setter Property="HorizontalAlignment" Value="Left" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ListBoxItem">
							<Border x:Name="Border" BorderThickness="1" BorderBrush="Transparent"
									SnapsToDevicePixels="True" Background="Transparent"
									Padding="{TemplateBinding Padding}">
								<GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
									<GridViewRowPresenter.Resources>
										<Style TargetType="TextBlock">
											<Setter Property="TextTrimming" Value="CharacterEllipsis" />
										</Style>
									</GridViewRowPresenter.Resources>
								</GridViewRowPresenter>
							</Border>
							<ControlTemplate.Triggers>
								<MultiTrigger>
									<MultiTrigger.Conditions>
										<Condition Property="IsMouseOver" Value="True" />
									</MultiTrigger.Conditions>
									<Setter Property="Background" TargetName="Border" Value="#1F26A0DA" />
									<Setter Property="BorderBrush" TargetName="Border" Value="#A826A0DA" />
								</MultiTrigger>
								<MultiTrigger>
									<MultiTrigger.Conditions>
										<Condition Property="Selector.IsSelectionActive" Value="False" />
										<Condition Property="IsSelected" Value="True" />
									</MultiTrigger.Conditions>
									<Setter Property="Background" TargetName="Border" Value="#3DDADADA" />
									<Setter Property="BorderBrush" TargetName="Border" Value="#FFDADADA" />
								</MultiTrigger>
								<MultiTrigger>
									<MultiTrigger.Conditions>
										<Condition Property="Selector.IsSelectionActive" Value="True" />
										<Condition Property="IsSelected" Value="True" />
									</MultiTrigger.Conditions>
									<Setter Property="Background" TargetName="Border" Value="#3D26A0DA" />
									<Setter Property="BorderBrush" TargetName="Border" Value="#FF26A0DA" />
								</MultiTrigger>
								<Trigger Property="IsEnabled" Value="False">
									<Setter Property="TextElement.Foreground" TargetName="Border"
											Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</Grid.Resources>
		<TextBox x:Name="solutionPathBox" />
		<Button x:Name="browseButton" Grid.Column="1" Margin="10,0,0,0" Content="_Browse" Click="browseButton_Click" />
		<TextBox x:Name="skipBox" Grid.Row="1" Margin="0,10,0,0" MaxLines="100" AcceptsReturn="True" Height="NaN"
				MinHeight="23" MaxHeight="100" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
				Padding="2,3" ToolTip="Projects to skip" />
		<Button x:Name="parseButton" Grid.Column="1" Grid.Row="1" Margin="10,10,0,0" Content="_Parse"
				Click="parseButton_Click" />
		<ListView x:Name="files" Grid.ColumnSpan="2" Grid.Row="2" BorderThickness="0" Margin="0,10,0,0">
			<ListView.View>
				<GridView>
					<GridViewColumn Width="175" DisplayMemberBinding="{Binding Name}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Padding="15,0" Content="Name" Tag="Name" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="60" DisplayMemberBinding="{Binding LineCount}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Lines" Tag="LineCount" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="135" DisplayMemberBinding="{Binding DateModified}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Date modified" Tag="DateModified" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="120" DisplayMemberBinding="{Binding Type}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Type" Tag="Type" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="70" DisplayMemberBinding="{Binding Size}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Size" Tag="Size" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="150" DisplayMemberBinding="{Binding Project}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Project" Tag="Project" />
						</GridViewColumn.Header>
					</GridViewColumn>
					<GridViewColumn Width="150" DisplayMemberBinding="{Binding Path}">
						<GridViewColumn.Header>
							<GridViewColumnHeader Content="Location" Tag="Path" />
						</GridViewColumn.Header>
					</GridViewColumn>
				</GridView>
			</ListView.View>
		</ListView>
		<Grid Grid.Row="3" Grid.ColumnSpan="2" Margin="0,0,0,-10" Height="22" Background="{x:Null}"
				TextElement.Foreground="#FF1E395B">
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
				<ColumnDefinition />
				<ColumnDefinition />
				<ColumnDefinition Width="4*" />
			</Grid.ColumnDefinitions>
			<TextBlock x:Name="itemCount" Text="0 items" VerticalAlignment="Center" Margin="0,0,5,0" />
			<TextBlock x:Name="lineCount" Grid.Column="1" Text="0 lines" VerticalAlignment="Center" Margin="0,0,5,0" />
			<TextBlock x:Name="itemSize" Grid.Column="2" Text="0 bytes" VerticalAlignment="Center" Margin="0,0,5,0" />
		</Grid>
	</Grid>
</Window>
